unit uFormCadUsuario;

interface

uses
  Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
  Vcl.Controls, Vcl.Forms, Vcl.Dialogs, uFormBaseCadastro, System.Actions,
  Vcl.ActnList, Data.DB, Vcl.ComCtrls, Vcl.StdCtrls, Vcl.Buttons, Vcl.ExtCtrls,
  Vcl.Mask, Vcl.DBCtrls, uTipo, Datasnap.Provider, Datasnap.DBClient;

type
  TFormCadUsuario = class(TFormBaseCadastro)
    lblId: TLabel;
    edtId: TDBEdit;
    edtLogin: TDBEdit;
    lblLogin: TLabel;
    lblSenha: TLabel;
    edtSenha: TDBEdit;
    procedure actPesquisarExecute(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

  procedure CadUsuario;

implementation

{$R *.dfm}

uses uDM, uFormPesquisa;

procedure CadUsuario;
var
  F: TFormCadUsuario;
begin
  F := TFormCadUsuario.Create(nil);
  try
    F.Show;
  finally

  end;
end;

procedure TFormCadUsuario.actPesquisarExecute(Sender: TObject);
var
  Dados: TUsuario;
begin
  inherited;
  if PesquisarUsuario(Dados) then
  begin
    cdsMestre.Close;
    cdsMestre.Params.ParamByName('Id').AsInteger := Dados.Id;
    cdsMestre.Open;
  end;
end;

initialization
  RegisterClass(TFormCadUsuario);

end.
